3.1.97 \(\int \frac {\sqrt {d^2-e^2 x^2}}{x (d+e x)} \, dx\) [97]

Optimal. Leaf size=46 \[ -\tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \]

[Out]

-arctan(e*x/(-e^2*x^2+d^2)^(1/2))-arctanh((-e^2*x^2+d^2)^(1/2)/d)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 46, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.259, Rules used = {864, 858, 223, 209, 272, 65, 214} \begin {gather*} -\text {ArcTan}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[d^2 - e^2*x^2]/(x*(d + e*x)),x]

[Out]

-ArcTan[(e*x)/Sqrt[d^2 - e^2*x^2]] - ArcTanh[Sqrt[d^2 - e^2*x^2]/d]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 223

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], x, x/Sqrt[a + b*x^2]] /; FreeQ[{a,
b}, x] &&  !GtQ[a, 0]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 858

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dist[g/e, Int[(d
+ e*x)^(m + 1)*(a + c*x^2)^p, x], x] + Dist[(e*f - d*g)/e, Int[(d + e*x)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a,
c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0] &&  !IGtQ[m, 0]

Rule 864

Int[((x_)^(n_.)*((a_) + (c_.)*(x_)^2)^(p_))/((d_) + (e_.)*(x_)), x_Symbol] :> Int[x^n*(a/d + c*(x/e))*(a + c*x
^2)^(p - 1), x] /; FreeQ[{a, c, d, e, n, p}, x] && EqQ[c*d^2 + a*e^2, 0] &&  !IntegerQ[p] && ( !IntegerQ[n] ||
  !IntegerQ[2*p] || IGtQ[n, 2] || (GtQ[p, 0] && NeQ[n, 2]))

Rubi steps

\begin {align*} \int \frac {\sqrt {d^2-e^2 x^2}}{x (d+e x)} \, dx &=\int \frac {d-e x}{x \sqrt {d^2-e^2 x^2}} \, dx\\ &=d \int \frac {1}{x \sqrt {d^2-e^2 x^2}} \, dx-e \int \frac {1}{\sqrt {d^2-e^2 x^2}} \, dx\\ &=\frac {1}{2} d \text {Subst}\left (\int \frac {1}{x \sqrt {d^2-e^2 x}} \, dx,x,x^2\right )-e \text {Subst}\left (\int \frac {1}{1+e^2 x^2} \, dx,x,\frac {x}{\sqrt {d^2-e^2 x^2}}\right )\\ &=-\tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\frac {d \text {Subst}\left (\int \frac {1}{\frac {d^2}{e^2}-\frac {x^2}{e^2}} \, dx,x,\sqrt {d^2-e^2 x^2}\right )}{e^2}\\ &=-\tan ^{-1}\left (\frac {e x}{\sqrt {d^2-e^2 x^2}}\right )-\tanh ^{-1}\left (\frac {\sqrt {d^2-e^2 x^2}}{d}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.12, size = 81, normalized size = 1.76 \begin {gather*} 2 \tanh ^{-1}\left (\frac {\sqrt {-e^2} x}{d}-\frac {\sqrt {d^2-e^2 x^2}}{d}\right )+\frac {e \log \left (-\sqrt {-e^2} x+\sqrt {d^2-e^2 x^2}\right )}{\sqrt {-e^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[d^2 - e^2*x^2]/(x*(d + e*x)),x]

[Out]

2*ArcTanh[(Sqrt[-e^2]*x)/d - Sqrt[d^2 - e^2*x^2]/d] + (e*Log[-(Sqrt[-e^2]*x) + Sqrt[d^2 - e^2*x^2]])/Sqrt[-e^2
]

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(140\) vs. \(2(42)=84\).
time = 0.07, size = 141, normalized size = 3.07

method result size
default \(-\frac {\sqrt {-\left (x +\frac {d}{e}\right )^{2} e^{2}+2 d e \left (x +\frac {d}{e}\right )}+\frac {d e \arctan \left (\frac {\sqrt {e^{2}}\, x}{\sqrt {-\left (x +\frac {d}{e}\right )^{2} e^{2}+2 d e \left (x +\frac {d}{e}\right )}}\right )}{\sqrt {e^{2}}}}{d}+\frac {\sqrt {-e^{2} x^{2}+d^{2}}-\frac {d^{2} \ln \left (\frac {2 d^{2}+2 \sqrt {d^{2}}\, \sqrt {-e^{2} x^{2}+d^{2}}}{x}\right )}{\sqrt {d^{2}}}}{d}\) \(141\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-e^2*x^2+d^2)^(1/2)/x/(e*x+d),x,method=_RETURNVERBOSE)

[Out]

-1/d*((-(x+d/e)^2*e^2+2*d*e*(x+d/e))^(1/2)+d*e/(e^2)^(1/2)*arctan((e^2)^(1/2)*x/(-(x+d/e)^2*e^2+2*d*e*(x+d/e))
^(1/2)))+1/d*((-e^2*x^2+d^2)^(1/2)-d^2/(d^2)^(1/2)*ln((2*d^2+2*(d^2)^(1/2)*(-e^2*x^2+d^2)^(1/2))/x))

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 55, normalized size = 1.20 \begin {gather*} -\frac {{\left (d \arcsin \left (\frac {x e}{d}\right ) e^{\left (-1\right )} + d e^{\left (-1\right )} \log \left (\frac {2 \, d^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-x^{2} e^{2} + d^{2}} d}{{\left | x \right |}}\right )\right )} e}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-e^2*x^2+d^2)^(1/2)/x/(e*x+d),x, algorithm="maxima")

[Out]

-(d*arcsin(x*e/d)*e^(-1) + d*e^(-1)*log(2*d^2/abs(x) + 2*sqrt(-x^2*e^2 + d^2)*d/abs(x)))*e/d

________________________________________________________________________________________

Fricas [A]
time = 2.14, size = 51, normalized size = 1.11 \begin {gather*} 2 \, \arctan \left (-\frac {{\left (d - \sqrt {-x^{2} e^{2} + d^{2}}\right )} e^{\left (-1\right )}}{x}\right ) + \log \left (-\frac {d - \sqrt {-x^{2} e^{2} + d^{2}}}{x}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-e^2*x^2+d^2)^(1/2)/x/(e*x+d),x, algorithm="fricas")

[Out]

2*arctan(-(d - sqrt(-x^2*e^2 + d^2))*e^(-1)/x) + log(-(d - sqrt(-x^2*e^2 + d^2))/x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- \left (- d + e x\right ) \left (d + e x\right )}}{x \left (d + e x\right )}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-e**2*x**2+d**2)**(1/2)/x/(e*x+d),x)

[Out]

Integral(sqrt(-(-d + e*x)*(d + e*x))/(x*(d + e*x)), x)

________________________________________________________________________________________

Giac [A]
time = 1.78, size = 48, normalized size = 1.04 \begin {gather*} -\arcsin \left (\frac {x e}{d}\right ) \mathrm {sgn}\left (d\right ) - \log \left (\frac {{\left | -2 \, d e - 2 \, \sqrt {-x^{2} e^{2} + d^{2}} e \right |} e^{\left (-2\right )}}{2 \, {\left | x \right |}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-e^2*x^2+d^2)^(1/2)/x/(e*x+d),x, algorithm="giac")

[Out]

-arcsin(x*e/d)*sgn(d) - log(1/2*abs(-2*d*e - 2*sqrt(-x^2*e^2 + d^2)*e)*e^(-2)/abs(x))

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {d^2-e^2\,x^2}}{x\,\left (d+e\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d^2 - e^2*x^2)^(1/2)/(x*(d + e*x)),x)

[Out]

int((d^2 - e^2*x^2)^(1/2)/(x*(d + e*x)), x)

________________________________________________________________________________________